HTMLForm: Clean up 0 handling
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 5 Mar 2014 20:15:41 +0000 (15:15 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 5 Mar 2014 20:40:48 +0000 (15:40 -0500)
commit5f57d5d657b7bb4b656b99acad1b2e85b9c834a8
treee93028202a437977c24c9d4397d668109190888a
parent28326b93bc8de7b58b842769aef6b7709a817ee8
HTMLForm: Clean up 0 handling

PHP, particularly with in_array, really has problems with integer 0
versus non-numeric strings. Let's clean that up by converting values to
strings more agressively and using the $strict option to in_array.

Oddly enough, the one place where strict in_array was being used already
broke when If4175332 stringified the values in one array but not the
other.

Bug: 62268
Change-Id: Id34e654eb8d0e70d093b11445273e542e491e265
includes/htmlform/HTMLMultiSelectField.php
includes/htmlform/HTMLRadioField.php
includes/htmlform/HTMLSelectAndOtherField.php
includes/htmlform/HTMLSelectField.php
includes/htmlform/HTMLSelectOrOtherField.php